package cn.anecansaitin.jep.parser.ast.node.statement;

import cn.anecansaitin.jep.Token;
import cn.anecansaitin.jep.parser.ast.node.Parameter;
import cn.anecansaitin.jep.parser.ast.node.expression.Identifier;

import java.util.List;

public class FunctionDeclaration extends Statement{
    private final Token returnType;
    private final Identifier name;
    private final List<Parameter> parameters;
    private final Block body;

    public FunctionDeclaration(Token returnType, Identifier name, List<Parameter> parameters, Block body,int line, int column) {
        super(line, column);
        this.returnType = returnType;
        this.name = name;
        this.parameters = parameters;
        this.body = body;
    }

    public Token returnType() {
        return returnType;
    }

    public Identifier name() {
        return name;
    }

    public List<Parameter> parameters() {
        return parameters;
    }

    public Block body() {
        return body;
    }
}
